package com.foreknow.demo14;

public class Test {
  public static void main(String[] args) {
    Master master = new Master();
        Pet p= new Dog();
        p.setName("tom");
        p.setHealth(20);
        p.setLove(90);

        master.cure(p);
        master.play(p);

        p = new Penguin();
        p.setName("QQ");
        p.setHealth(40);
        p.setLove(100);

        master.cure(p);
        master.play(p);

    //    Dog dog = new Dog();
    //    dog.setName("tom");
    //    dog.setHealth(20);
    //    dog.setLove(90);
    //
    //    master.cure(dog);
    //
    //    Penguin penguin = new Penguin();
    //    penguin.setName("QQ");
    //    penguin.setHealth(40);
    //    penguin.setLove(100);
    //
    //    master.cure(penguin);
  }
}
